//
//  BaseApi.h
//  Api
//
//  Created by CPX on 2018/5/29.
//  Copyright © 2018年 CPX. All rights reserved.
//

#import "BaseApi.h"
#import "BaseLib.h"

extern NSErrorDomain APPResponseError; ///<自定义错误域

// 根地址
//#define RootURL @"http://ss.afr99.com"
#define RootURL @"http://ec2-13-229-248-204.ap-southeast-1.compute.amazonaws.com:8000"//TEST
//#define RootURL @"http://172.16.20.3:8000"//DEV
//#define RootURL @"http://api.onlinemuslim.net"//PRODUCT
// 古兰经根地址
#define QURANRootURL @"http://quran.onlinemuslim.net"

//首页壁纸
#define IndexWallpaperPath @"/index_wallpapers"
#define IndexRecommendPath @"/homepage_recommend/recommend_show"

#define CompassSkinPath @"/kaabas"

//语言
#define LanguagesPath @"/languages"
#define TranslationPath @"/quran"
#define RegisterPath @"/users"
#define SendCheckCode @"/users/send_check_code"
#define LoginPath @"/users/login"
#define ResetPwdPath @"/users/forget_password"
#define FBCreateUserPath @"/users/create_facebook_user"
#define QuranBackgroundPath @"/quran_background"
#define VersionPath @"/version_info"

//channel
#define VideoListPath @"/video/videos"

//notice
#define NoticeList @"/message/message/notice"
#define SystemNoticeList @"/message/message/system_notice"

//user
#define User @"/user"
#define RegisterToken @"/message/message/userTerminal"

//greetcard
#define GreetTextList @"/trans_clifford_text"
#define GreetPicList @"/greetingcard_wallpaper"
#define GreetGifList @"/gif_greeting_card"

#define MyAzkarPath @"/bless/bless_blog/personal_bless_blog_list"

#define BlessBlogPath @"/bless/bless_blog/"
#define BlessPublicPath @"/bless/public_bless/"

/**
 接口基类
 @author yzl
 */
@interface BaseApi : NSObject

#pragma mark - header 头参数
@property (nonatomic,copy) NSString *auth; ///<认证信息
@property (nonatomic,copy) NSString *language; ///<app语言
@property (nonatomic,copy) NSString *version; ///<app 版本


+ (instancetype)standard;
+ (void)registerApp;

+ (BOOL)dealWithResponse:(id)response;

+ (NSDictionary*)dealError:(NSError*)error;

+ (NSMutableDictionary*)header;

@end
